<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      box-sizing: border-box;
    }
    body {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
      background-color: steelblue;
      font-family: 'Muli', sans-serif;
      margin: 0;
      color: #fff;
    }
    .container {
      background-color: rgba(0, 0, 0, 0.4);
      padding: 20px 40px;
    }
    .container h1 {
      text-align: center;
      margin-bottom: 30px;
    }
    .container a {
      color: lightblue;
      text-decoration: none;
    }
    .text {
      margin-top: 30px;
    }
    .btn {
      cursor: pointer;
      display: inline-block;
      width: 100%;
      background-color: lightblue;
      padding: 15px;
      border: 0;
      border-radius: 5px;
      font-size: 16px;
    }
    .btn:focus {
      outline: line;
    }
    .btn:active {
      transform: scale(0.98);
    }
    .form-control {
      position: relative;
      margin: 20px 0 40px;
    }
    .form-control input {
      background-color: transparent;
      border: 0;
      border-bottom: 2px #fff solid;
      padding: 15px 0;
      width: 100%;
      color: #fff;
      display: block;
      font-size: 18px;
    }
    .form-control input:focus,
    .form-control input:valid {
      outline: 0;
      border-bottom-color: lightblue;
    }
    .form-control label {
      position: absolute;
      top: 15px;
      pointer-events: none;
    }
    .form-control label span {
      display: inline-block;
      font-size: 18px;
      min-width: 5px;
      transition: all 0.3s ease-in-out;
    }
    .form-control input:focus+label span,
    .form-control input:focus+label span {
      color: lightblue;
      transform: translateY(-30px);
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>Please Login</h1>
    <form>
      <div class="form-control">
        <input type="text" required>
        <label>Email</label>
      </div>
      <div class="form-control">
        <input type="password" required>
        <label>Password</label>
      </div>
      <button class="btn">Login</button>
      <p class="text">Don't have an account? <a href="#">Register</a></p>
    </form>
  </div>

  <script>
    const label = document.querySelectorAll(".form-control label");

    label.forEach(label => {
      label.innerHTML = label.innerText.split("")
      .map((letter, index) => `<span style="transition-delay:${index * 50}ms">${letter}</span>`).join("");
    });
  </script>
</body>
</html>